home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / programming / c / bison / smakefile < prev   
Encoding:
Makefile  |  1996-09-07  |  2.2 KB  |  70 lines

  1. #### Start of system configuration section. ####
  2.  
  3. SRC = Src/
  4. OBJ = Obj/
  5.  
  6. CC = SC
  7.  
  8. # Things you might add to DEFS:
  9. # STDC_HEADERS      If you have ANSI C headers and libraries.
  10. # HAVE_STRING_H     If you don't have ANSI C headers but have string.h.
  11. # HAVE_MEMORY_H     If you don't have ANSI C headers and have memory.h.
  12. # HAVE_STRERROR     If you have strerror function.
  13. DEFS = DEFINE=STDC_HEADERS
  14.  
  15. # Some System V machines do not come with libPW.  If this is true, use
  16. # the GNU alloca.o here.
  17. ALLOCA = $(OBJ)alloca.o
  18.  
  19. #### End of system configuration section. ####
  20.  
  21. # This rule allows us to supply the necessary -D options
  22. # in addition to whatever the user asks for.
  23. .c.o:
  24.     @$(CC) $(DEFS) $< OBJNAME=$@
  25.  
  26. # names of parser files
  27. PFILE  = Bison.simple
  28. PFILE1 = Bison.hairy
  29.  
  30. PFILES = DEFINE XPFILE="PROGDIR:$(PFILE)" DEFINE XPFILE1="PROGDIR:$(PFILE1)"
  31.  
  32. OBJECTS = $(OBJ)LR0.o     $(OBJ)allocate.o $(OBJ)closure.o $(OBJ)conflicts.o \
  33.           $(OBJ)derives.o $(OBJ)files.o    $(OBJ)getargs.o $(OBJ)gram.o      \
  34.           $(OBJ)lalr.o    $(OBJ)lex.o      $(OBJ)main.o    $(OBJ)nullable.o  \
  35.           $(OBJ)output.o  $(OBJ)print.o    $(OBJ)reader.o  $(OBJ)reduce.o    \
  36.           $(OBJ)symtab.o  $(OBJ)warshall.o $(OBJ)getopt.o  $(OBJ)getopt1.o   \
  37.           $(OBJ)version.o $(ALLOCA)
  38.  
  39. all: Bison
  40.  
  41. Bison: $(OBJECTS)
  42.     @$(CC) $(LDFLAGS) LINK TO $@ $(OBJECTS) $(LIBS)
  43.  
  44. # This file is different to pass the parser file names to the compiler.
  45. $(OBJ)files.o     : $(SRC)files.c
  46.     @$(CC) $(PFILES) $(DEFS) $(SRC)files.c OBJNAME=$(OBJ)files.o
  47.  
  48. $(OBJ)alloca.o    : $(SRC)alloca.c
  49. $(OBJ)allocate.o  : $(SRC)allocate.c
  50. $(OBJ)closure.o   : $(SRC)closure.c
  51. $(OBJ)conflicts.o : $(SRC)conflicts.c
  52. $(OBJ)derives.o   : $(SRC)derives.c
  53. $(OBJ)LR0.o       : $(SRC)LR0.c
  54. $(OBJ)getargs.o   : $(SRC)getargs.c
  55. $(OBJ)gram.o      : $(SRC)gram.c
  56. $(OBJ)lalr.o      : $(SRC)lalr.c
  57. $(OBJ)lex.o       : $(SRC)lex.c
  58. $(OBJ)main.o      : $(SRC)main.c
  59. $(OBJ)nullable.o  : $(SRC)nullable.c
  60. $(OBJ)output.o    : $(SRC)output.c
  61. $(OBJ)print.o     : $(SRC)print.c
  62. $(OBJ)reader.o    : $(SRC)reader.c
  63. $(OBJ)symtab.o    : $(SRC)symtab.c
  64. $(OBJ)warshall.o  : $(SRC)warshall.c
  65. $(OBJ)getopt.o    : $(SRC)getopt.c
  66. $(OBJ)getopt1.o   : $(SRC)getopt1.c
  67. $(OBJ)reduce.o    : $(SRC)reduce.c
  68. $(OBJ)version.o   : $(SRC)version.c
  69.  
  70.